package models.accounts;

import framework.utils.ContextUtil;

public class AccountConstant {

    public final static String DIC_ACCOUNT_LIST_NAME="accountList";
    
    public final static String DIC_PLATFORM_TYPE_NAME="unicall.platformType";
    
    public final static String DIC_ACCOUNT_STATE_NAME="unicall.accountState";
    
    
    
    /**
     * 主账户sid
     * @return
     */
    public static String getAccountSid(){
        return ContextUtil.getProperty("account.sid");
    }
    
    /**
     * 主账户token
     * @return
     */
    public static String getAccountToken(){
        return ContextUtil.getProperty("account.token");
    }
    
    /**
     * 获取代理服务地址
     * @return
     */
    public static String getNotifyProxy(){
        return ContextUtil.getProperty("account.notify.proxy");
    }
    
    /**
     * 代理服务的Uri
     * @return
     */
    public static String getProxyUri(){
        return ContextUtil.getProperty("account.proxy.uri", "http://127.0.0.1:9011");
    }
    /**
     * 账户创建接口
     * @return
     */
    public static String getAccountCreateUrl(){
        String baseUrl = getProxyUri();
        String _url = ContextUtil.getProperty("account.create.url", "/account/create");
        return baseUrl+_url;
    }
    
    /**
     * 账户更新接口
     * @return
     */
    public static String getAccountUpdateUrl(){
        String baseUrl = getProxyUri();
        String _url = ContextUtil.getProperty("account.update.url", "/account/update");
        return baseUrl+_url;
    }
    
    /**
     * 删除接口
     * @return
     */
    public static String getAccountDestroyUrl(){
        String baseUrl = getProxyUri();
        String _url = ContextUtil.getProperty("account.destroy.url", "/account/destroy");
        return baseUrl+_url;    
    }
    
    
    
}
